<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>XX系统 - 房屋信息更新</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/lib/font-awesome/css/font-awesome.css">
</head>
<style>
	#mess{
	display:inline;
	color:red;
	}
</style>
<body>
	<div class="box">
		<h3>房屋信息更新</h3>
		<span id="mess">${mess }</span>
		<form
			action="${pageContext.request.contextPath}/editHouseServlet?action=edit"
			method="post" enctype="multipart/form-data">
			 <input type="hidden" name="h_id" value="${house.h_id }" class="layui-input">
			<table class="form-table">
				<tr>
					<td>地区</td>
					<td colspan="3" class="control">
						<%-- <input type="text" name="h_area" placeholder="填写地区" value="${house.h_area }"> --%>
						<select name="h_area">
							<option value="中原区" ${house.h_area=='中原区'?'selected':'' }>中原区</option>
							<option value="金水区" ${house.h_area=='金水区'?'selected':'' }>金水区</option>
							<option value="经开区" ${house.h_area=='经开区'?'selected':'' }>经开区</option>
							<option value="二七区" ${house.h_area=='二七区'?'selected':'' }>二七区</option>
							<option value="高新区" ${house.h_area=='高新区'?'selected':'' }>高新区</option>
					</select>
					</td>
				</tr>
				<tr>
					<td>小区名字</td>
					<td colspan="3" class="control"><input type="text"
						name="h_estate" placeholder="小区名字" value="${house.h_estate}">
					</td>
				</tr>
				<tr>
					<td>单元号</td>
					<td colspan="3" class="control"><input type="text"
						name="h_unitNumber" placeholder="单元号"
						value="${house.h_unitNumber}"></td>
				</tr>
				<tr>
					<td>楼层</td>
					<td colspan="3" class="control"><input type="text"
						name="h_floor" placeholder="楼层" value="${house.h_floor}">
					</td>
				</tr>
				<tr>
					<td>房间号</td>
					<td colspan="3" class="control"><input type="text"
						name="h_roomNo" placeholder="房间号" value="${house.h_roomNo}">
					</td>
				</tr>
				<tr>
					<td>面积（平米）</td>
					<td colspan="3" class="control"><input type="text"
						name="h_acreage" placeholder="面积" value="${house.h_acreage}">
					</td>
				</tr>
				<tr>
					<td>朝向</td>
					<td colspan="3" class="control"><input type="radio"
						name="h_direction" value="南北" ${house.h_direction=='南北'?'checked':'' }>南北 <input
						type="radio" name="h_direction" value="东西" ${house.h_direction=='东西'?'checked':'' }>东西</td>
				</tr>
				<tr>
					<td>装修</td>
					<td colspan="3" class="control">
						<%-- <input type="text" name="h_fitment" placeholder="装修" value="${house.h_fitment}"> --%>
						<select name="h_fitment">
							<option value="精装修" ${house.h_fitment=='精装修'?'selected':'' }>精装修</option>
							<option value="简装修" ${house.h_fitment=='简装修'?'selected':'' }>简装修</option>
					</select>
					</td>
				</tr>
				<tr>
					<td>是否双气</td>
					<td colspan="3" class="control"><input type="radio"
						name="h_isDoubleAir" placeholder="是否双气" value="1" checked>是
						<input type="radio" name="h_isDoubleAir" placeholder="是否双气"
						value="0">否</td>
				</tr>
				<tr>
					<td>限住人数</td>
					<td colspan="3" class="control"><input type="text"
						name="h_limit" placeholder="限住人数" value="${house.h_limit}">
					</td>
				</tr>
				<tr>
					<td>配套设施</td>
					<td colspan="3" class="control">
						<%-- <input type="text" name="h_facility" placeholder="配套设施" value="${house.h_facility}"> --%>
						<input type="checkbox" name="h_facility" value="WIFI" >WIFI
						<input type="checkbox" name="h_facility" value="家具齐全" checked>家具齐全
						<input type="checkbox" name="h_facility" value="空调" >空调 
						<input type="checkbox" name="h_facility" value="冰箱">冰箱
					</td>
				</tr>
				<tr>
					<td>出租价格（元/月）</td>
					<td colspan="3" class="control"><input type="text"
						name="h_price" placeholder="出租价格" value="${house.h_price}">
					</td>
				</tr>
				<tr>
					<td>出租状态</td>
					<td colspan="3" class="control"><select name="h_status">
							<option value="1" ${house.h_status==1?'selected':'' }>已出租</option>
							<option value="2" ${house.h_status==2?'selected':'' }>未出租</option>
							<option value="3" ${house.h_status==3?'selected':'' }>停止出租</option>
					</select></td>
				</tr>
				<tr>
					<td>房屋图片</td>
					<td colspan="3" class="control">
						<p>
							<img src="${pageContext.request.contextPath}${house.h_img}" width="300px" height="200px">
						</p> <input type="file" name="h_img" placeholder="">
					</td>
				</tr>
				<tr>
					<td>完整地址信息</td>
					<td colspan="3" class="control">
					<input type="text" name="h_address" placeholder="完整地址信息">
					</td>
				</tr>

			</table>
			<div class="buttons">
				<input class="btn btn-primary va-bottom" type="submit" value="保存">&nbsp;&nbsp;
				<a class="btn btn-default" href="javascript:history.go(-1)">返回</a>
			</div>
		</form>
		<c:remove var="mess" scope="session"/>
	</div>
</body>
</html>